package com.tarena.luban.worker.server.rpc;

import com.tarena.luban.worker.server.client.api.WorkerApi;
import com.tarena.luban.worker.server.service.WorkerServerService;
import com.tarena.tp.luban.worker.server.dto.dto.WorkerDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class WorkerRpcImpl implements WorkerApi {
    @Autowired
    private WorkerServerService workerServerService;
    @Override
    public WorkerDTO queryWorkerByUserId(Long userId) {
        return workerServerService.queryAreasAndCatsByUserId(userId);
    }
}
